package cn.zmwh.im.server.modules.ums.controller;


import cn.zmwh.im.server.api.Result;
import cn.zmwh.im.server.constant.Constants;
import cn.zmwh.im.server.modules.ums.pojo.entity.ImGroup;
import cn.zmwh.im.server.modules.ums.service.ImGroupService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

/**
 * <p>
 * 群 前端控制器
 * </p>
 *
 * @author dmzmwh
 * @since 2025-06-19
 */
@RestController
@RequestMapping("/api/ums/group")
public class ImGroupController {

    @Autowired
    private ImGroupService imGroupService;


    @GetMapping("/list")
    @ApiOperation(value = "群列表")
    public Result<List<ImGroup>> list(@ApiIgnore @RequestHeader(Constants.UID) Long uid) {

        return imGroupService.listByUid(uid);
    }

}

